import request from '@/utils/request'
// 申请请假
export function applyLeave(data){
    return request({
        url: '/client/applyLeave/addStuApplyLeave',
        method: 'post',
        data: data
    })
}

// 获取请假列表
export function getStuLeaveList(params){
    return request({
        url: '/client/applyLeave/stuApplyLeavelist',
        method: 'get',
        params: params
    })
}

export function getStuLeaveLast(){
    return request({
        url: '/client/applyLeave/stuApplyLeaveLast',
        method: 'get'
    })
}

// 判断请假时间是否冲突
export function checkStuLeaveTime(params){
    return request({
        url: '/client/applyLeave/checkStuLeaveTime',
        method: 'get',
        params: params
    })
}

// 获取学生需要延长的假期
export function getExtendLeave(params){
    return request({
        url: '/client/applyLeave/getExtendLeave',
        method: 'get',
        params: params
    })
}

// 获取待教师审核的请假记录
export function getTeaApplyLeaveList(params){
    return request({
        url: '/client/applyLeave/getTeaApplyLeaveList',
        method: 'get',
        params: params
    })
}

// 学生取消申请
export function delApplyLeave(id){
    return request({
        url: '/client/applyLeave/delApplyLeave/'+id,
        method: 'delete'
    })
}

